{extend name="layout" /}
{block name="body"}    
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">

          <form action="{:url('edit')}" method="post" name="edit-form" class="row edit-form">
            <div class="form-group col-md-12">
              <label for="pid">上级栏目</label>
              <div class="form-controls">
                <select name="pid" class="form-control selectpicker" id="pid">
                  {volist name="columns" id="vo"}
                  <option value="{$vo.id}" {if condition="$info.pid == $vo.id"}selected{/if} {if condition="$info.id == $vo.id"}disabled{/if}>{$vo.title_show|raw}</option>
                  {/volist}
                </select>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="title">栏目名称</label>
              <div class="form-controls">
                <input type="text" class="form-control" id="title" name="title" value="{$info.title}" placeholder="请输入栏目名称" />
                <small class="form-text text-muted">(必填，50个字符以内!)</small>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="en_title">栏目英文名</label>
              <div class="form-controls">
                <input type="text" class="form-control" id="en_title" name="en_title" value="{$info.en_title}" placeholder="请输入栏目英文名" />
                <small class="form-text text-muted">(必填，50个字符以内!)</small>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="route_name">路由名称</label>
              <div class="form-controls">
                <input type="text" class="form-control" id="route_name" name="route_name" value="{$info.route_name}" placeholder="请输入路由名称" />
                <small class="form-text text-muted">(20个字符，由英文字母、数字、下划线组合。)</small>
              </div>
            </div>
            <div class="form-group col-md-12 ">
              <label for="model_id">内容模型</label>
              <div class="form-controls clearfix">
                {volist name="models" id='mo'}
                <div class="custom-control custom-radio custom-control-inline">
                  <input type="radio" id="model_id_{$key}" name="model_id" class="custom-control-input" value="{$mo.id}" {if $info['model_id'] == $mo.id}checked{/if}>
                  <label class="custom-control-label" for="model_id_{$key}">{$mo.title}</label>
                </div>
                {/volist}
                <small class="form-text text-muted">(必选)</small>
              </div>
            </div>
            {php}
            $form = ['title' => '内容', 'name' => 'content', 'value' => $info['content']];
            {/php}
            {include file="../application/admin/view/form/ueditor.html" type='' /}
            <div class="form-group col-md-12">
              <label for="seo_title">SEO标题</label>
              <div class="form-controls">
                <input type="text" class="form-control" id="seo_title" name="seo_title" value="{$info.seo_title}" />
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="seo_keywords">SEO关键词</label>
              <div class="form-controls">
                <input type="text" class="form-control" id="seo_keywords" name="seo_keywords" value="{$info.seo_keywords}" />
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="seo_description">SEO描述</label>
              <div class="form-controls">
                <textarea name="seo_description" class="form-control" id="seo_description" rows="3">{$info.seo_description}</textarea>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="sort">排序</label>
              <div class="form-controls">
                <input type="text" class="form-control" id="sort" name="sort" value="{$info.sort}" />
              </div>
            </div>
            <div class="form-group col-md-12">
              <label>状态</label>
              <div class="form-controls clearfix">
                <div class="custom-control custom-radio custom-control-inline">
                  <input type="radio" id="statusOne" name="status" class="custom-control-input" value="0" {if condition="$info.status == 0"}checked{/if}>
                  <label class="custom-control-label" for="statusOne">禁用</label>
                </div>
                <div class="custom-control custom-radio custom-control-inline">
                  <input type="radio" id="statusTwo" name="status" class="custom-control-input" value="1" {if condition="$info.status == 1"}checked{/if}>
                  <label class="custom-control-label" for="statusTwo">启用</label>
                </div>
              </div>
            </div>
            <div class="form-group col-md-12">
              <input type="hidden" name="id" value="{$info.id}" />
              <button type="submit" class="btn btn-primary m-r-5 ajax-post" target-form="edit-form">确 定</button>
              <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
          </form>
 
        </div>
      </div>
    </div>
    
  </div>
{/block}
{block name="otherjs"}
{include file="../application/admin/view/form/formjs.html" /}
{/block}